package com.dream.wuliu.utils;

import java.util.Calendar;
import java.util.Date;

public class MyDatePart {
	
	private int year;
	private int month;
	private int day;
	
	public MyDatePart(int y,int m,int d){
		this.year = y; this.month = m; this.day = d;
	}
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	public static MyDatePart  today(){
		
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(new Date());
		return new MyDatePart(calendar.get(Calendar.YEAR),calendar.get(Calendar.MONTH),calendar.get(Calendar.DAY_OF_MONTH));
		
		
	}
	@Override
	public String toString() {
		return MyDateUtils.format(year, month+1, day);
	}
	
	
}
